package net.maku.qdd.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 优惠券详细信息VO
 * 包含优惠券、商品、商家的完整信息
 */
@Data
@Schema(description = "优惠券详细信息")
public class TicketDetailVO implements Serializable {
    private static final long serialVersionUID = 1L;

    // 优惠券信息
    @Schema(description = "券id")
    private Integer ticketId;

    @Schema(description = "券码")
    private Integer ticketCode;

    @Schema(description = "优惠额度")
    private Float preferential;

    @Schema(description = "使用限制")
    private Integer limitation;

    @Schema(description = "过期时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime deadTime;

    @Schema(description = "生效时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime effectiveTime;

    // 商品信息
    @Schema(description = "商品id")
    private Integer goodsId;

    @Schema(description = "商品名称")
    private String goodsName;

    @Schema(description = "商品单价")
    private Integer goodsPrice;

    @Schema(description = "商品剩余数量")
    private Integer goodsNum;

    // 商家信息
    @Schema(description = "商家id")
    private Integer merchantId;

    @Schema(description = "商家名称")
    private String merchantName;

    @Schema(description = "商家负责人")
    private String directorName;

    @Schema(description = "商家联系电话")
    private String merchantPhone;

    @Schema(description = "商店地址")
    private String merchantAdress;

    @Schema(description = "注册时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime signtime;
}
